<?php
/*********
	2015/9/18
	模板管理
*******/
error_reporting(E_ALL);
class Template_TemplateController extends Shine_BaseAction
{

	public function init()
	{
		parent::init();
	
		Zend_Loader::loadClass('TemplateUtils');	

	}

	public function indexAction(){
		
		$m = TemplateUtils::test();
		echo $m;
	}


	/**********
		2019/4/11
		上传背景图片
	**********/
	public function uploadimgAction(){
		$params = $this->_getAllParams();
		$m = TemplateUtils::uploadImage($params);
		echo $m;
	}

	/*******
		2019/4/11
		删除素材
	**********/
	public function deleteimgAction(){
		$params = $this->_getAllParams();
		$m = TemplateUtils::deleteImage($params);
		echo $m;
	}
	

	/*******
		2019/4/11
		获取字段对应关系
	********/
	public function templatefieldmapAction(){
		$params = $this->_getAllParams();
		$m = TemplateUtils::templateFieldMap($params);
		echo $m;
	}


	/*************
		2019/4/16
		模板导出功能
	***********/
	public function exportthemeAction(){

		$params = $this->_getAllParams();
		$m = TemplateUtils::exportThemeJson($params);
		echo $m;	
	}

	/*************
		2019/4/19
		模板导入功能
	**********/
	public function importthemeAction(){
		$params = $this->_getAllParams();

		$m = TemplateUtils::importThemeJson($params);
		echo $m;
	}

}

